home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / grafik / converter / mpimage42 / install-mpimage < prev    next >
Encoding:
Text File  |  1996-07-16  |  3.6 KB  |  223 lines

  1. ; MPImage - Amiga Image program
  2. ; Copyright (C) © 1993-96 Mark John Paddock
  3.  
  4. ; mark@topic.demon.co.uk
  5. ; mpaddock@cix.compulink.co.uk
  6.  
  7. ; This is the script to install MPImage
  8. ; $VER: Install-MPImage 4.2 (24.3.96)
  9.  
  10. (complete 0)
  11.  
  12. ; Determine machine config
  13. (Set Use040
  14.     (= 
  15.         (database "cpu")
  16.         68040
  17.     )
  18. )
  19.  
  20. (Set Has881
  21.     (+
  22.         (AND
  23.             (NOT (run "cpu check 68881"))
  24.             (>=
  25.                 (database "cpu")
  26.                 68020
  27.             )
  28.         )
  29.         Use040
  30.     )
  31. )
  32.  
  33. (Set Has881
  34.     (+
  35.         (>=
  36.             (database "cpu")
  37.             68020
  38.         )
  39.         Has881
  40.     )
  41. )
  42.  
  43. (Set InstallDir (expandpath ""))
  44.  
  45. (Set DestLib
  46.     (tackon InstallDir "MPImage.library")
  47. )
  48.  
  49. ; Check choice of program to install
  50. (set Use881
  51.     (askchoice
  52.         (prompt "Install which version?")
  53.         (help "There are three versions of the MPImage.library. "
  54.                 "The first requires just a 68000. "
  55.                 "The second requires a 68020. "
  56.                 "The third requires both a 68020 or 68030 CPU with a 68881 or 68882 FPU. "
  57.                 "The last requires a 68040.")
  58.         (choices
  59.             "68000"
  60.             "68020"
  61.             "68020/030/68881/2"
  62.             "68040"
  63.         )
  64.         (default Has881)
  65.     )
  66. )
  67.  
  68. (if (= Use881 3)
  69.     (
  70.          (set SrcLib
  71.             (tackon InstallDir "MPImage.library.040")
  72.          )
  73.         (copyfiles
  74.             (source SrcLib)
  75.             (dest InstallDir)
  76.             (newname DestLib)
  77.         )
  78.     )
  79. )
  80.  
  81. (if (= Use881 2)
  82.     (
  83.          (set SrcLib
  84.             (tackon InstallDir "MPImage.library.881")
  85.          )
  86.         (copyfiles
  87.             (source SrcLib)
  88.             (dest InstallDir)
  89.             (newname DestLib)
  90.         )
  91.     )
  92. )
  93.  
  94. (if (= Use881 1)
  95.     (
  96.          (set SrcLib
  97.             (tackon InstallDir "MPImage.library.020")
  98.          )
  99.         (copyfiles
  100.             (source SrcLib)
  101.             (dest InstallDir)
  102.             (newname DestLib)
  103.         )
  104.     )
  105. )
  106.  
  107. (if (= Use881 0)
  108.     (
  109.          (set SrcLib
  110.             (tackon InstallDir "MPImage.library.000")
  111.          )
  112.         (copyfiles
  113.             (source SrcLib)
  114.             (dest InstallDir)
  115.             (newname DestLib)
  116.         )
  117.     )
  118. )
  119.  
  120. (complete 50)
  121.  
  122. (if
  123.     (askbool
  124.         (prompt "Do you have djpeg and cjpeg?")
  125.         (help "Select 'Yes' if you have cjpeg and djpeg and you wish to "
  126.                 "use them to load and save jpeg files.")
  127.           (default 0)
  128.     )
  129.     (
  130.         (makedir
  131.             "ENV:MPImage"
  132.         )
  133.         (makedir
  134.             "ENVARC:MPImage"
  135.         )
  136.         (set cjpeg
  137.             (askstring
  138.                 (prompt "Enter your command to run cjpeg")
  139.                 (help '"%s" should be used to in place of the input and '
  140.                         "output files")
  141.                 (default 'cjpeg "%s" "%s"')
  142.             )
  143.         )
  144.         (textfile
  145.             (dest "ENV:MPImage/cjpeg")
  146.             (append cjpeg)
  147.         )
  148.         (textfile
  149.             (dest "ENVARC:MPImage/cjpeg")
  150.             (append cjpeg)
  151.         )
  152.         (set djpeg
  153.             (askstring
  154.                 (prompt "Enter your command to run djpeg")
  155.                 (help '"%s" should be used to in place of the input and '
  156.                         "output files")
  157.                 (default 'djpeg "%s" "%s"')
  158.             )
  159.         )
  160.         (textfile
  161.             (dest "ENV:MPImage/djpeg")
  162.             (append djpeg)
  163.         )
  164.         (textfile
  165.             (dest "ENVARC:MPImage/djpeg")
  166.             (append djpeg)
  167.         )
  168.     )
  169. )
  170.  
  171. (complete 75)
  172.  
  173. (if
  174.     (askbool
  175.         (prompt "Do you have pngtopnm and pnmtopng?")
  176.         (help "Select 'Yes' if you have pngtopnm and pnmtopng and you wish to "
  177.                 "use them to load and save PNG files.")
  178.           (default 0)
  179.     )
  180.     (
  181.         (makedir
  182.             "ENV:MPImage"
  183.         )
  184.         (makedir
  185.             "ENVARC:MPImage"
  186.         )
  187.         (set pnmtopng
  188.             (askstring
  189.                 (prompt "Enter your command to run pnmtopng")
  190.                 (help '"%s" should be used to in place of the input and '
  191.                         "output files")
  192.                 (default 'pnmtopng "%s" >"%s"')
  193.             )
  194.         )
  195.         (textfile
  196.             (dest "ENV:MPImage/pnmtopng")
  197.             (append pnmtopng)
  198.         )
  199.         (textfile
  200.             (dest "ENVARC:MPImage/pnmtopng")
  201.             (append pnmtopng)
  202.         )
  203.         (set pngtopnm
  204.             (askstring
  205.                 (prompt "Enter your command to run pngtopnm")
  206.                 (help '"%s" should be used to in place of the input and '
  207.                         "output files")
  208.                 (default 'pngtopnm "%s" >"%s"')
  209.             )
  210.         )
  211.         (textfile
  212.             (dest "ENV:MPImage/pngtopnm")
  213.             (append pngtopnm)
  214.         )
  215.         (textfile
  216.             (dest "ENVARC:MPImage/pngtopnm")
  217.             (append pngtopnm)
  218.         )
  219.     )
  220. )
  221.  
  222. (complete 100)
  223.